home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / sound / players / qdplay31.lzh / PLAY.DOC < prev    next >
Text File  |  1993-08-04  |  11KB  |  301 lines

  1.  
  2.  
  3.  
  4.                                  QD Play
  5.                    Version 3.1
  6.                  By Dave Baggett
  7.  
  8.           Copyright (C) 1990, 1991, 1992, 1993 by David M. Baggett                   
  9.  
  10. --------------------------------------------------------------------------------
  11.                   User Contract
  12.  
  13. This program is FREE.  You may distribute it at will, provided you
  14.     
  15.     1) do not charge any money for it,
  16.     2) distribute it WITH the documentation, and
  17.     3) do not change the program or documentation in ANY WAY.
  18.  
  19. --------------------------------------------------------------------------------
  20.  
  21.   
  22. Command Line Usage
  23. ------------------
  24.  
  25.    This utility will play 8-bit sound samples.  To call it from a 
  26. command shell (e.g. GULAM), type
  27.  
  28.     play <pathname> <Hz>
  29.  
  30. where <pathname> is the name of the sample file, and <Hz> is the 
  31. playback frequency in Hertz.  For example, type
  32.  
  33.     play deadjim.snd 11000
  34.  
  35. and you will hear Bones and Captain Kirk.  Note that the program 
  36. doesn't care how fast or slow you play the sample, so try
  37.  
  38.     play deadjim.snd 18000
  39.  
  40. and
  41.  
  42.     play deadjim.snd 7500
  43.  
  44. to see the effect of changing the playback speed.
  45.  
  46.  
  47. AUTO Folder usage
  48. -----------------
  49.  
  50.    Isn't it *nifty* how those Mac people can make their computers play
  51. digitized sounds when they boot up?  Well, now you too can experience
  52. the tremendous joy of hearing your machine make some obnoxious noise
  53. when you turn it on.  Here's how:
  54.  
  55.    Put play.prg in your AUTO folder.  Use autosort to make play.prg
  56. the first thing to get called on bootup.  You can do this by hand
  57. by saving a copy of your AUTO programs, deleting your AUTO folder, 
  58. then copying the AUTO programs into a fresh AUTO folder in the 
  59. order in which you want the AUTO programs to be called.  (For all
  60. you programmer types: NO it's not a requirement that play.prg get
  61. called first, it's just more Mac-ish that way.)
  62.  
  63.    Then create a file called play.inf with a text editor containing 
  64. lines that are just QD Play command lines.  E.g.,:
  65.  
  66.     deadjim.snd 18000
  67.     deadjim.110 11000 -v -l -hippo
  68.     stereo.125 10000 -2 -d
  69.  
  70. NOTE: There can be no blank lines in the file.  QD Play picks a random
  71. line of the file; if that line is blank no sound will be played.  Similarly,
  72. all options for a sound must go on a single line.
  73.  
  74.    There is no limit to the number of lines in play.inf.
  75.  
  76.  
  77. Specifying an Alternate D/A Device
  78. ----------------------------------
  79.  
  80.    The following options select the various supported playback devices:
  81.    
  82.     -hippo:  use Hippo digitizer
  83.     -replay: use ST Replay digitizer
  84.     -ste:    use STe sound, using MFP for timing
  85.     -dma:    use STe sound, using DMA for timing
  86.     
  87. All these except -replay can be abbreviated by their first letters.  The
  88. -replay switch can be minimally abbreviated to -re to distinguish it
  89. from the -r (reverse) option.
  90.  
  91.  
  92. Other Exciting Options
  93. ----------------------
  94.  
  95.    The -q option will prevent QD Play from printing its cheerful greeting
  96. message.  For example,
  97.  
  98.     play d:\usr\sounds\attack.snd 11000 -q
  99.  
  100. will play attack.snd without printing a blurb. 
  101.  
  102.    Similarly, the -v option forces QD Play to print its message even
  103. when its run from the AUTO folder.
  104.  
  105.    The -r option will cause QD Play to play the sound in reverse.
  106.    
  107.    The -l option tells QD Play to loop the sample either 5 times or
  108. until a key is pressed.  You can also specifiy a number of times to
  109. loop; e.g, -l15 will loop 15 times or until a key is pressed.
  110.  
  111. CAVEAT:  Do NOT try this with samples faster than about 16 kHz using the
  112. ST speaker for playback.  Beyond 16 kHz the sample playing interrupts happen
  113. so often that they make the TOS keyboard handler flakey, which often results
  114. in TOTAL SYSTEM LOCKUP.  (And lots of bombs and other cool stuff on the
  115. screen.)
  116.  
  117.    The -2 option makes QD Play interpret the sample data as stereo, where
  118. alternating bytes go to the left and right channels.  Note that you can play
  119. stereo sounds on any device, but on mono devices the two channels will be
  120. mixed.  This usually sounds bad if the stereo sample has panning effects.
  121.  
  122.    The -z option tells QD Play to interpret the sample data as
  123. signed magnitude instead of the standard (as far as I'm concerned
  124. at least) unsigned magnitude.  Some sample editors use signed and
  125. others use unsigned -- it makes no difference in terms of sound
  126. quality, but it's really annoying if you don't have a sample player
  127. that supports both.  If you play a sample and it sounds really noisy,
  128. try the -z option -- you may have a signed magnitude sample on your hands.
  129.  
  130.    The -m option is mainly of interest to programmers who wish to play
  131. digitized sounds from within their own programs by shelling out to QD Play.
  132. The -m option tells QD Play to treat the pathname argument as a memory
  133. address expressed in decmial.  QD Play then reads samples from this
  134. memory location instead of loading a file.  The argument to -m specifies 
  135. the length of the sample.  E.g.,
  136.  
  137.     play 340576 8000 -m32000
  138.     
  139. will play the 32000 bytes beginning at memory location 340,576 (decimal)
  140. at a sample rate of 8kHz.  WARNING:  If you try to play a sample from
  141. protected memory, the program will crash.  Finally, note that this probably 
  142. won't work under a multitasking operating system like MultiTOS; it only works 
  143. when the full address space is available to all programs.
  144.  
  145.    
  146. Command Line Usage Examples
  147. ---------------------------
  148.  
  149.    Since QD Play's many options can be a bit daunting at first, here
  150. are some examples to get you started quickly:
  151.  
  152. play chord.110 11000
  153.     
  154.     Plays chord.110 at 11000 hertz through the ST speaker, using
  155.    the MFP for timing.    
  156.  
  157. play stereo.125 12500 -2 -d
  158.     
  159.     Plays stereo.125 at 12500 hertz through the STe 8-bit D/A using DMA,
  160.    treating the data as stereo.    
  161.  
  162. play stereo.125 10000 -2 -d
  163.  
  164.     Same effect as above.  If you don't pick one of the STe DMA device's
  165.    four preset playback rates, QD Play will pick the closest one for you.
  166.    
  167. play stereo.125 10000 -2 -s
  168.  
  169.     Unlike the example above, this command will actually play the
  170.    stereo sound at 10000 hertz, not 12500, since the -s option tells QD Play
  171.    to use the STe 8-bit D/A but to use the MFP for timing.  Sound quality
  172.    is not as good with this method, but unlike the -d option (DMA sound device
  173.    timing) it offers playback at all sample rates. 
  174.  
  175. play signed.080 8000 -z -re
  176.  
  177.     Plays signed.080 at 8000 hertz through the ST Replay digitizer,
  178.    treating the data as signed magnitude.
  179.  
  180. play stereo.125 8000 -2
  181.  
  182.     Plays stereo.125 at 8000 hertz through the ST speaker.  The data
  183.    is interpreted as stereo, but the two channels are mixed to produce
  184.    mono data suitable for the ST speaker (since the ST speaker can't
  185.    play stereo sounds).
  186.  
  187. play deadjim.110 11000 -q -l -hippo
  188.  
  189.     Loops deadjim.110 at 11000 hertz either 10 times or until a
  190.    key is pressed.  No greeting message is printed, and the Hippo/Navaron
  191.    digitizer is used as the output device. 
  192.  
  193. play rooster.080 8000 -r -re
  194.  
  195.     Plays rooster.080 at 8000 hertz in reverse through the ST Replay
  196.    digitizer.  Note that the -replay option can't be abbreviated to -r
  197.    because -r means "play the sample in reverse." 
  198.  
  199. play chord.110 22000 -l
  200.  
  201.     If run on an unaccelerated ST, locks up your machine.  22000 hertz is
  202.    too fast for a looped sample on an unmodified ST.  Keep looped samples
  203.    down below 16 kHz to be safe.
  204.  
  205. play 123456 11000 -m120000 -z
  206.  
  207.     Plays the 120,000 bytes of signed sample data starting at memory 
  208.    location 123,456 (decimal) through the ST speaker at a rate of 11kHz.
  209.  
  210.  
  211. Miscellaneous Info About Samples and the ST
  212. -------------------------------------------
  213.  
  214.    A sanity-preserving convention I've come up with after dealing with
  215. literally thousands of samples is to store the sample rate in the filename
  216. extension.  E.g.,
  217.  
  218.     filename.110 -> 11.0 kHz -> 11000 Hz
  219.     filaname.123 -> 12.3 kHz -> 12300 Hz
  220.     filename.062 ->  6.2 kHz ->  6200 Hz
  221.     
  222. It helps a lot, since sample speed is not normally encoded in the samples
  223. themselves.  (Sample editing programs usually have their own sample format,
  224. but the most compatbile format